package com.atguigu.gulimall.ware.feign;

import com.atguigu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author wzb
 * @version V1.0
 * @Package com.atguigu.gulimall.ware.feign
 * @date 2022-06-24 16:33
 * @Copyright ©
 */
@FeignClient("gulimall-gateway")
public interface ProductFeginService {

    /**
     * 1) 让所有的请求过网关
     *      1、@FeignClient("gulimall-gateway"): 给gulimall-gateway所在的机器发请求
     *      2、/api/product/skuinfo/info/{skuId}
     *  2) 直接让后台指定服务处理
     *      1、@FeignClient("gulimall-product")
     *      2、/product/skuinfo/info/{skuId}
     */
    @RequestMapping("/api/product/skuinfo/info/{skuId}")
    public R info(@PathVariable("skuId") Long skuId);


}
